<template>
  <div class="dashboard-editor-container">
    欢迎您！！！
  </div>
</template>

<script>
import { remindContract} from "@/api/business/contract"; 

export default {
  name: 'Index',
  
  data() {
    return {

    }
  },
  mounted(){
      this.showNotice();
  },
  methods: {
    showNotice() {
      remindContract().then(response => {
        let result = response.data;

        if(result && result.length > 0){
          let temp =[]
          result.forEach(function(key,value,map){
            temp.push("【"+key.contractNo+"】")
          })

          let message = '即将有'+result.length+"份合同临近交货日期，请及时处理！合同编号为："+temp.join(',')
          this.$notify({
            title: '合同交货提醒',
            message: message,
            duration: 10000
          });
        }
      });
    }
  }
}
</script>

<style lang="scss" scoped>
.dashboard-editor-container {
  padding: 32px;
  background-color: rgb(240, 242, 245);
  position: relative;
}

</style>
